<template>
  <div style="float:right">
    <el-button type='primary' @click="logout">退出登录</el-button>
  </div>
</template>

<script>

export default {
  name: "Header",
  methods: {
    logout() {
      localStorage.removeItem('token')
      this.$router.push('/')
      this.$message.success('退出成功')
    },
  },
}
</script>

<style scoped></style>